<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        ul{
            cursor: pointer;
        }
        div>ul>li{
            display: inline-block;
            width: 100px;
            height: 25px;
            margin-right: 5px;
            background: gold;
        }
        div>ul>li>ul{
            display: none;
            background: white;
        }
        div:first-of-type{
            width: 550px;
            height: 25px;
            margin: 100px auto 0;
        }
        div:last-of-type{
            width: 600px;
            height: 150px;
            background: pink;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    <div>
        <ul>
            <li>
                平面设计
                <ul>
                    <li>自强不息</li>
                    <li>自强不息</li>
                    <li>自强不息</li>
                </ul>
            </li>
            <li>
                UI设计
                <ul>
                    <li>自强不息</li>
                    <li>自强不息</li>
                    <li>自强不息</li>
                </ul>
            </li>
            <li>
                网页制作
                <ul>
                    <li>自强不息</li>
                    <li>自强不息</li>
                    <li>自强不息</li>
                </ul>
            </li>
            <li>
                flash动画
                <ul>
                    <li>自强不息</li>
                    <li>自强不息</li>
                    <li>自强不息</li>
                </ul>
            </li>
            <li>
                js制作
                <ul>
                    <li>自强不息</li>
                    <li>自强不息</li>
                    <li>自强不息</li>
                </ul>
            </li>
        </ul>
    </div>
    <div>
        123456789987654321
    </div>
    <script>
        var liList = document.querySelectorAll('div>ul>li');
        console.log(liList);
        liList.forEach((val,index)=>{
            val.addEventListener('mouseover',(e)=>{
                e.target.childNodes[1].style.display='block';
                // e.target.lastChild.style.display='block';
            })
        })

    </script>
</body>
</html>